﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SinsenWeb.Models;


namespace SinsenWeb.Views.SubController
{
    public partial class MemberFooter : ViewPageBase
    {
        protected string OnlineMembers()
        {
            var members = ViewData["online"] as IEnumerable<Member>;

            string ret = "";
            string separator = "";
            int count = 0;
            foreach(var member in members)
            {
                count++;
                ret += separator;
                separator = ", ";
                ret += member.FullName;
                if(count%3==0)
                {
                    ret += "<br/>";
                }
            }
            return ret;
        }
    }
}
